$(function() {
	// $('.suredy-checker-img').on('click', function(event) {
	// var $this = $(this);
	// $this.attr('src', $this.attr('src') + '?_=' + (new Date().getTime()));
	// });

	// 初始化人员树的数据
	$('div.select-user-tree').tree($.suredy.contextPath + '/config/ou/tree/true/true/true', {
		checkbox : false,
		style : 'department',
		showTitle : true,
		click : function() {
			var $this = $(this);

			if ($('+ul', $this).length > 0)
				return false;

			$('div.select-user-tree').collapse('toggle');

			var data = $.suredy.tree.data($this);

			$('input[name="userCode"]').val(data.userCode);
			$('input#userName').val(data.name);

			return true;
		}
	});
});
